﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Operator_Power.aspx.cs" Inherits="syc.Admin.Operator_Power" %>
<html>
<head>
<body>
    <script type="text/javascript" language="javascript" src="/common.js"></script>
    <form id="form1" runat="server">
    <div id="wintop" class="wintop">用户权限设置</div>
        <asp:Panel ID="Panel1" runat="server" CssClass="panel">
            <asp:Button ID="Button_Finish" runat="server" CssClass="button" 
                Text="保 存" onclick="Button_Finish_Click"/>
            <asp:Button ID="Button_Back" runat="server" CssClass="button" 
                Text="取 消" onclick="Button_Back_Click" />
        </asp:Panel>
       
        
        <asp:Panel ID="Panel2" runat="server" CssClass="panel2" Visible="False">
            <asp:Label ID="Message" runat="server" Text="·准备就绪" CssClass="prompt"></asp:Label>
        </asp:Panel>
        
<asp:Panel ID="Panel3" runat="server" CssClass="panel">
所属部门：
<select id="bumen" name="bumen">
    <option value="1">一分厂</option>
    <option value="2">二分厂</option>
    <option value="3">三分厂</option>
    <option value="4">四分厂</option>
    <option value="5">五分厂</option>
    <option value="0">其他</option>
</select>
</asp:Panel>
        
<asp:Panel ID="Panel4" runat="server" CssClass="panel" Font-Size="15px" >
<b>[功能模块权限]</b><br />
<input id="m1" type="checkbox" name="m1" /><label for="m1" class="fw">生产管理</label>
&nbsp;<input id="m2" type="checkbox" name="m2" /><label for="m2" class="fw">分厂管理</label>
&nbsp;<input id="m3" type="checkbox" name="m3" /><label for="m3" class="fw">采购管理</label>
&nbsp;<input id="m4" type="checkbox" name="m4" /><label for="m4" class="fw">销售管理</label><br />
<input id="m5" type="checkbox" name="m5" /><label for="m5" class="fw">物流中心</label>
&nbsp;<input id="m6" type="checkbox" name="m6" /><label for="m6" class="fw">设备机动</label>
&nbsp;<input id="m7" type="checkbox" name="m7" /><label for="m7" class="fw">技术质量</label>
&nbsp;<input id="m8" type="checkbox" name="m8" /><label for="m8" class="fw">决策分析</label><br />
<input id="m9" type="checkbox" name="m9" /><label for="m9" class="fw">财务核算</label>
&nbsp;<input id="m10" type="checkbox" name="m10" /><label for="m10" class="fw">基础数据</label>
&nbsp;<input id="m11" type="checkbox" name="m11" /><label for="m11" class="fw">系统维护</label>

        </asp:Panel>
<asp:Panel ID="Panel5" runat="server" CssClass="panel" Font-Size="15px" >
<b>[详细功能权限]</b>
<script>
<%=this.js%>
var i;
for(i=0;i<oppower.length;i++)
{
    if(oppower.charAt(i)=="1" && i<11)
   document.getElementById("m"+(i+1)).checked=true;
}
var fsa=flist.split("\n");
var fa;
var t="";
var ch;
var k=0;
for(i=0;i<fsa.length-1;i++)
{
    fa=fsa[i].split(",",3);
    if(t!=fa[2])
    {
        document.write("<br/><br/>"+fa[2]+"：");
        t=fa[2];
        k=0;
        //continue;
    }
    if(opfun.indexOf(","+fa[0]+",")>=0)
    {
        ch="checked";
    }
    else
    {
        ch="";
    }
    if(k%4==0)document.write("<br/>");
    document.write("<input id='fun"+fa[0]+"' type='checkbox' name='fun"+fa[0]+"'"+ch+"/><label for='fun"+fa[0]+"' class='fw'>"+fa[1]+"</label>\n");
    k++;
    
}
document.getElementById("bumen").value=opdid;
</script>
</asp:Panel>
    </form>
    
    <script>
        var textboxs = document.getElementsByTagName("input");
        for (var i = 0; i < textboxs.length; i++) {
            if (textboxs[i].className == "pageturn" || textboxs[i].className == "intxt1" || textboxs[i].className == "intxt2") {
                textboxs[i].onfocus = function(e) { this.select(); };
            }
        }
        function makecalendar(d, o) {
            obj = o;
            idate = makedate(d);
            cdate = new Date(idate.getFullYear(), idate.getMonth(), 1);
            ds.style.left = (getObjectLeft(o)-180) + "px";
            ds.style.top = (getObjectTop(o) + 25) + "px";
            ds.style.display = 'block';
            showcalendar();
        }
    </script>
</body>
</html>
